using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;

public class InvisibleWhen : MonoBehaviour
{
    public bool whiteListMode;
    public RuntimePlatform[] platforms;
    private void Start()
    {
        bool hasCurrentPlatform = false;
        foreach (var plat in platforms)
        {
            if (Application.platform == plat)
            {
                hasCurrentPlatform = true;
                break;
            }
        }

        gameObject.SetActive(!(whiteListMode ^ hasCurrentPlatform));
    }
}
